# Contributor: Dennis Przytarski <dennis@przytarski.com>
# Maintainer: Dennis Przytarski <dennis@przytarski.com>
pkgname=pathvector
pkgver=6.3.2
pkgrel=3
pkgdesc="Declarative edge routing platform"
url="https://pathvector.io"
# broken on 32-bit
arch="all !x86 !armhf !armv7"
license="MIT"
depends="bird"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/natesales/pathvector/archive/refs/tags/v$pkgver.tar.gz
	pathvector.yml
	"
# require full setup with host routing in place
options="!check"

build() {
	sed -i 's/\(version = "\)devel/\1'"$pkgver"'/g' main.go
	go build -v
}

package() {
	install -Dm755 pathvector "$pkgdir"/usr/bin/pathvector
	install -Dm644 "$srcdir"/pathvector.yml "$pkgdir"/etc/pathvector.yml
}

sha512sums="
34cd31b30b4ded02cd01aeee96a6f7eddff0feb372cd9d5eda51dd77b87b50286ecb5585789851838afc0e47cbd6739e1dad9120b06ad4489470a380014757fc  pathvector-6.3.2.tar.gz
8c446535089ecfca6aaaa335dda2567a17224761f5daa6d8bea68981ad0cfb32d7e40a12691953f06d1e24b08bc131bf9ad2468389a8e5058c056202056f94cd  pathvector.yml
"
